package com.dao;

import com.vo.Dept;
import com.vo.Emp;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author 鲁昊天
 * @date 2024/12/16
 */
public interface IDeptDAO {
    @Select("select * from dept")
   List<Dept> selectAll() throws Exception;

    @Delete("delete from dept where deptno = #{deptno}")
    int delDept(int deptno);

    @Select("select * from dept where deptno = #{deptno}")
    Dept findDeptById(int deptno);

    @Update("update dept set dname = #{dname}, loc = #{loc} where dept.deptno = #{deptno}")
    int updateDept(Dept dept);
}
